package cn.com.digitalnet.ad.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springside.modules.web.Servlets;

@Controller
@RequestMapping("/website")
public class WebsiteController {

	@RequestMapping(method = RequestMethod.GET)
	public String login(HttpServletRequest request,HttpServletResponse response) throws Exception{
		Servlets.setNoCacheHeader(response);
		if(SecurityUtils.getSubject().isAuthenticated()){
			SecurityUtils.getSubject().logout();
		}
		return "website/index";
	}

	

	
}
